Repository navigation
Integrate live Mac dashboard, exact usage and shared Swift account backend - #1354
Open
kydo-researcher wants to merge 3 commits into
Open
kydo-researcher wants to merge 3 commits into
kydo-researcher wants to merge 3 commits into
Conversation
…t backend Simplify Home and live chip activity, preserve exact session usage, rank models by earnings, improve Mac Stats and cooling recovery, and reuse existing coordinator APIs through scoped native caches and read-only dashboard sessions. Include native, UI, API and store regression tests and canonical documentation.
|
@kydo-researcher is attempting to deploy a commit to the EigenLabs Team on Vercel. A member of the Team first needs to authorize it. |
…g and notifications
14 tasks done
…count-polish Make desktop Models Autopilot-first; polish sign-in, cooling and notifications
This was referenced Oct 8, 2026
This was referenced Oct 13, 2026
Merged
Merged
Merged
This was referenced Oct 14, 2026
Merged
Merged
Collaborator
|
Superseded by #1518, which brings the complete desktop app (this PR's changes plus the merged audit fixes on |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR targets
codex/desktop-app(PR #1318) and brings the locally tested dashboard, usage accounting, cooling fixes, and API simplification into that branch.The Electron app keeps the same Swift
darkbloomCLI/backend. Swift owns local observations, coordinator access, account credentials, caching and native operations; Electron renders those observations through the existing fixed IPC bridge.What changes for users
Home and live Mac activity
Usage accounting, earnings, models and Mac Stats
Cooling and compatibility
Shared backend and API changes
useBackend,pageResources,useInsightsanduseRequestHistoryuse native state revisions and fetch only resources needed by visible pages; remove independent polling timers.DesktopResources,DesktopAccountCloudandDesktopResourceCachecompose existing/v1/me/providers,/v1/me/summary,/v1/provider/account-earnings, public network/catalog and latest-release responses.desktop_account, explicit browser consent, opaque read-only account credentials and 30-day expiry. Swift stores credentials owner-only, separately from provider credentials.darkbloom desktop login/logoutusing the same account session store and flow as Electron.ConsumeDeviceCodeatomically consumes an approved, unexpired account grant once in both MemoryStore and PostgresStore. Concurrent losers revoke their newly created token.Routes and persistence: add
DELETE /v1/device/token; extend the existing device-code endpoints with purpose-bound consent/exchange; addwindow=7d|30dto the existing account-earnings read. Reuse the existing hashed provider-token and device-code tables with distinct scope prefixes; no database schema migration. Keep legacy desktop routes for compatibility, while this app stops probing them.Before
flowchart TB subgraph UI["Electron UI"] H["Home / Models / Stats"] --> R["useBackend + page timers"] H --> V["Output-oriented totals and sparse stats"] H --> S["Chip mixes samples and simulated activity"] end subgraph Native["Swift desktop backend"] R --> D["DesktopResources: independent reads"] D --> C["Desktop account / insights / release endpoints"] C --> F["404 or unavailable account views"] A["Cooling action"] --> U["Review runtime helper provisioning"] U --> E["Authorization or ownership failure"] end classDef ui fill:#dbeafe,stroke:#2563eb,color:#172554 classDef native fill:#dcfce7,stroke:#16a34a,color:#14532d classDef issue fill:#fee2e2,stroke:#dc2626,color:#7f1d1d class H,R,V,S ui class D,C,A,U native class F,E issueAfter
flowchart TB subgraph UI["Electron UI"] H["Home / Models / Stats"] --> R["useBackend + pageResources: visible reads"] R --> I["Fixed IPC bridge"] O["Exact observed totals, earnings, loaded models"] end subgraph Native["Same Swift darkbloom CLI"] I --> B["DesktopBackend + streamed state revisions"] B --> C["DesktopResourceCache: scoped + coalesced"] B --> J["ProviderUsageHistory + DesktopUsageHistory"] C --> P["Existing account / public / latest-release reads"] J --> T["Local usage or verified settled history"] P --> O T --> O L["DesktopAccountActions / desktop login"] --> D["DeviceAuth + purpose-bound browser consent"] D --> K["Separate read-only session; expiry / revocation"] K --> C A["DesktopCoolingAuthorization"] --> F["DesktopFanRuntime: verified signed CLI"] F --> W["Bounded firmware retry; real success or cause"] end classDef ui fill:#dbeafe,stroke:#2563eb,color:#172554 classDef native fill:#dcfce7,stroke:#16a34a,color:#14532d classDef external fill:#fef3c7,stroke:#d97706,color:#78350f classDef outcome fill:#ede9fe,stroke:#7c3aed,color:#4c1d95 class H,R,I ui class B,C,J,L,D,K,A,F native class P,T external class O,W outcomeBlue: Electron; green: shared native backend; amber: observed data; purple: user-visible outcomes; red: prior failure paths. See also the interactive
docs/assets/desktop-api-architecture.htmldiagram.Validation
Completed on the local review build:
make coordinator-test: complete coordinator suite, including 1,794 API tests; coordinator build passed.Focused desktop-account API tests with the Go race detector: purpose-bound consent, concurrent one-shot exchange, owner/read scope, expiry/revocation and >1,000-record window aggregation.
make desktop-test: 391 tests across 59 files; desktop lint and production build passed.Swift desktop/auth/counter/history/cooling regressions: 57 tests across 14 suites; native CLI compiled successfully.
make desktop-api-test: real isolated HTTP fixture checks auth/isolation, shared release reads, exact counters, stale credentials, account sign-out without provider unlinking, cancellation, idempotency, settings and executable replacement.Console tests: 812 tests across 104 files; console build passed; lint had zero errors and 99 existing warnings.
make docs-impact-check BASE=origin/codex/desktop-appandmake docs-check: passed with full Git history; patch whitespace passed.Rebuilt and ad hoc signed the local macOS app, verified its deep/strict signature, reopened it and inspected live Home/Stats and native resource responses. Confirmed the signed serving provider and its session start were preserved, including persisted confirmed token/earnings totals.
go test -race ./store -run TestConsumeDeviceCode -v: memory-store contract passed (16 concurrent consumers, approved/pending/consumed/expired/missing grants). The equivalent PostgreSQL contract is included for CI; local execution skipped because no throwawayDATABASE_URLis configured.Full
make provider-testdid not pass in this environment: the XCTest phase reported 56 assertions/errors in MiMo tests requiring unconfigured prompt/payload fixtures; the general Swift Testing phase ran 3,781 tests in 506 suites and reported three fixture-unwrapping issues in MiMo scanner/startup tests. Required inputs includeMIMO_PROMPT_ARTIFACT_DIRECTORY,MIMO_PROMPT_REFERENCE_VECTORSandMIMO_V26_SERIAL_LOAD_FIXTURES, which CI provisions before its provider suite. The focused desktop tests above passed; this PR does not claim a complete local provider-suite pass.The published commit is GitHub-verified and both Mermaid diagrams were checked in the GitHub-rendered PR page.
Hosted checks: GitHub Actions are waiting for maintainer approval of this fork contribution. Vercel previews are blocked on team authorization. These are external approval gates; no deployment approval was granted by this PR.
Rollout and practical limits